package com.hyl.monsterInEachCave;

import com.hyl.creature.Monster;

import java.util.ArrayList;

/**
 * @description:
 * @author: molar
 * @date: Created in 2020/6/14 17:04
 * @version:
 * @modified By:
 */
public class MiddleCaveMonsterSet {
    private ArrayList<Monster> middleCaveMonsters = new ArrayList<>();

    public Monster getMiddleCaveMonster(String id){
        Monster middleMonster = null;
        for (Monster item:middleCaveMonsters){
            if (id.equals(item.getId())){
                middleMonster = item;
                break;
            }
        }
        return middleMonster;
    }

    public MiddleCaveMonsterSet() {
    }

    public MiddleCaveMonsterSet(ArrayList<Monster> middleMonsters) {
        this.middleCaveMonsters = middleMonsters;
    }

    public ArrayList<Monster> getMiddleMonsters() {
        return middleCaveMonsters;
    }

    public void setMiddleMonsters(ArrayList<Monster> middleMonsters) {
        this.middleCaveMonsters = middleMonsters;
    }
}
